<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3-7 Vue中的条件渲染</title>
    <script src="../vue.js"></script>
</head>

<body>
    <div id="app">
        <div v-if="show" data-test="v-if">{{message}}</div>
        <div v-else data-test="v-else">{{message}}</div>

        <div v-if="content === 'a'">This is A</div>
        <div v-else-if="content === 'b'">This is B</div>
        <div v-else>This is CCCCCC</div>
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                show: false,
                message: "yu kai",
                content:""
            }
        })
    </script>
</body>

</html>